use serde::{Deserialize, Serialize};
use sqlx::FromRow;
use uuid::Uuid;

#[derive(Debug, Serialize, Deserialize, FromRow)]
pub struct User {
    pub id: Uuid,
    pub username: String,
    pub email: String,
    #[serde(skip_serializing)]
    pub password_hash: String,
    #[serde(with = "time::serde::timestamp")]
    pub created_at: time::OffsetDateTime,
    #[serde(with = "time::serde::timestamp")]
    pub updated_at: time::OffsetDateTime,
}
